package cn.exrick.xboot.modules.activiti.serviceimpl.mybatis;

import cn.exrick.xboot.common.exception.XbootException;
import cn.exrick.xboot.modules.activiti.dao.mapper.ActMapper;
import cn.exrick.xboot.modules.activiti.service.mybatis.IActService;
import cn.hutool.core.util.StrUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author Exrickx
 */
@Service
public class IActServiceImpl implements IActService {

    @Autowired
    private ActMapper actMapper;

    @Override
    public Integer deleteBusiness(String table, String id) {

        if(StrUtil.isBlank(table)||StrUtil.isBlank(id)){
            throw new XbootException("关联业务表名或id为空");
        }
        return actMapper.deleteBusiness(table, id);
    }

    @Override
    public Integer findSjCount() {
        return actMapper.findSjCount();
    }

    @Override
    public List<Map> findSjCharts() {
        return actMapper.findSjCharts();
    }

    @Override
    public Integer getjcAll(String end) {
        return actMapper.getjcAll(end);
    }

    @Override
    public Integer getzgAll(String end) {
        return actMapper.getzgAll(end);
    }

    @Override
    public List<Map> findwtCharts(String end) {
        return actMapper.findwtCharts(end);
    }

    @Override
    public String getJJAll() {
        return actMapper.getJJAll();
    }

}
